package org.example.examsystem.controller;

import org.example.examsystem.entity.ScoreQueryResult;
import org.example.examsystem.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ScoreController {

    @Autowired
    private ScoreService scoreService;

    @GetMapping("/scores")
    public List<ScoreQueryResult> getScores() {
        return scoreService.getScores();
    }
}
